using System;

namespace C3.Proto.Core.Model
{
    [Serializable]
    public abstract class Root
    {
        public int Id { get; set; }
        
        public override bool Equals(object obj)
        {
            if (obj == null) return false;

            if (GetType() != obj.GetType()) return false;


            var m = (Base)obj;


            return Equals(Id, m.Id);
        }

        public override int GetHashCode()
        {

            return Id * 7;

        }
    }
    [Serializable]
    public abstract class Base : Root
    {
        public string Name { get; set; }
        public DateTime CreateDate { get; set; }
        public DateTime ModifiedDate { get; set; }
        
    }
}